import request from "../utils/request.js";
let baseUrl = import.meta.env.VITE_APP_BASE_API_CHAT;

// 获取用户下智能体列表
export const getAgentList = (data) => {
  return request(
    baseUrl + "/chatmgt/agentInfo/wxgetAgentListByUserId",
    "post",
    data
  );
};

// 创建智能体
export const createAgent = (data) => {
  return request(baseUrl + "/chatmgt/agentInfo/saveAgentByUser", "post", data);
};

// 获取音色列表
export const getVoiceAttr = () => {
  return request(baseUrl + "/chatmgt/voice/list", "get");
};

// 获取智能体信息
export const getAgent = (data) => {
  return request(baseUrl + "/chatmgt/app/getAgentInfo", "post", data);
};

// 编辑智能体
export const editAgent = (data) => {
  return request(baseUrl + "/chatmgt/agentInfo/wxupdateAgent", "post", data);
};

// 获取智能体属性列表
export const getAgentAttr = (params) => {
  return request(
    baseUrl + "/chatmgt/SysDictData/findAgentAddAttributeslist",
    "get",
    params
  );
};
//清除上下文
export const clearAgentContext = (data) => {
  return request(baseUrl + "/chatmgt/messageSender/clear", "POST", data);
};

//完善智能体
export const initAgentAttr = (data) => {
  return request(
    baseUrl + "/chatmgt/agentInfo/wxAutoFillAgentInfo",
    "POST",
    data
  );
};

//删除预置智能体
export const deletePresetAgent = (data) => {
  return request(
    baseUrl + "/chatmgt/agent_user_friends/deletePreset",
    "DELETE",
    data
  );
};
